namespace Warehouse

open System.Windows.Data
open FSharp.Windows
open Warehouse.Controls

type CompanyInfoEvents = 
    | Save of (unit -> unit)

type CompanyInfoView() = 
    inherit View<CompanyInfoEvents, CompanyInfoModel, CompanyInfoWindow>()
    
    override this.EventStreams = 
        [
            this.Control.Save.ClickToValue(Save this.OK)
        ] 

    override this.SetBindings model =
        Binding.FromExpression 
            <@
                this.Control.Value.Text <- model.Value
            @>        
            
